package com.lovo.view.total;

import java.util.List;

import com.lovo.bean.CutPageBean;
import com.lovo.javafxComponent.LovoCutPage;
import com.lovo.javafxComponent.LovoTable;
import com.lovo.javafxComponent.LovoTitle;
import com.lovo.service.ITotalService;
import com.lovo.service.impl.TotalServiceImpl;

import javafx.scene.layout.Pane;

/**
 * 地区面板
 */
public class TotalPane extends Pane {

    /**
     * 地区表格
     */
    private LovoTable table;

    /**
     * 分页对象
     */
    private LovoCutPage cutObj;
    private ITotalService totalService = new TotalServiceImpl();

    /**
     * 构造方法
     */
    public TotalPane() {
        this.initComponent();
    }

    /**
     * 初始化组件
     */
    public void initComponent() {
        new LovoTitle("地区统计", 0, 30, this);
        initTable();
    }


    //------------------------

    /**
     * 初始化表格
     */
    private void initTable() {
        this.table = new LovoTable<>(new String[]{
                "城市名称:name", "录入学校:schoolCount", "接洽中学校:inContactCount",
                "待审学校:pendingCount","审核未通过学校:failedCount","推广开展学校:passedCount"
        }, 10, 80, 780, 260, this);
    	table.updateData(totalService.findAll());
    	
    }

}
